<?php if(count($model)):?>
<h3><?php echo $this->pageTitle = $model[0]['title']?></h3>
<?php foreach($model as $record):?>
<article class="category-list">
    <header>
    <h2><?php echo CHtml::link(CHtml::encode($record->title),Yii::app()->createUrl($record->categories->name.'/'.CHtml::encode($record->title)))?></h2>

    <div class="info" >
        <p class="date"><span class="glyphicon glyphicon-time"></span><?php echo CHtml::tag('time',array(),CLocale::getInstance(Yii::app()->getLocale()->id)->dateFormatter->formatDateTime(strtotime($record->create_time),"long",false)); ?></p>
        <p class="category"><?php echo CHtml::encode($record->categories->name); ?></p>
        <p class="tags"><?php echo CHtml::encode($record->tags); ?></p>
        <p class="comments"></p>
    </div>
</header>
    <p class="thumb"><?php echo CHtml::image('/images/article/'.$record->id.'/'.$record->image,$record->image,array('class'=>'img-mini','title'=>$record->image));?></p>

    <p><?php echo CHtml::encode($record->description); ?></p>

    <p class="more"><?php echo CHtml::link('Читать далее',Yii::app()->createUrl($record->categories->name.'/'.CHtml::encode($record->title)))?></p>
    <div class="clear"></div>
</article>
<?php endforeach;?>
<?$this->widget('CLinkPager', array(
    'pages' => $pages,
))?>
<?php else:?>
    <div class="label label-danger"><?php echo Yii::t('ArticleModule.base','Record is not found')?></div>
<?php endif;?>
